package com.example.sc.learn.util;

import lombok.Data;

import java.io.Serializable;

/**
 * Created by baipan
 * Date: 2019-03-30
 */
@Data
public class ResponseData<T extends Serializable> {



    private Integer code;
    private String msg;
    private T data;




    public ResponseData(){
        this.code = 0;
    }


    public ResponseData(String msg, T data) {
        this.code = -1;
        this.data = data;
        this.msg  =  msg;
    }

    public ResponseData(T data) {
        this.code = 0;
        this.msg  =  "SUCCESS";
        this.data = data;
    }
}
